<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateNwYbzYptUserinfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('nw_ybz_ypt_userinfo', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('姓名');
            $table->string('phone')->comment('手机');
            $table->string('id_number')->comment('证件号码');
            $table->string('gender')->nullable()->comment('性别');
            $table->date('birth_date')->nullable()->comment('出生日期');
            $table->string('ethnicity')->nullable()->comment('民族');
            $table->string('political_status')->nullable()->comment('政治面貌');
            $table->string('emergency_contact')->nullable()->comment('紧急联络人');
            $table->string('emergency_phone')->nullable()->comment('联系电话');
            $table->string('home_address')->nullable()->comment('家庭地址');
            $table->string('employee_type')->nullable()->comment('人员性质');
            $table->string('company')->nullable()->comment('所属单位');
            $table->date('hire_date')->nullable()->comment('入司日期');
            $table->date('last_medical_exam')->nullable()->comment('最近一次体检时间');
            $table->date('contract_expiry')->nullable()->comment('合同到期时间');
            $table->date('last_access_grant')->nullable()->comment('最近一次准入时间');
            $table->decimal('access_score', 5, 2)->nullable()->comment('准入成绩');
            $table->string('certification_status')->nullable()->comment('取证情况');
            $table->string('latest_batch_exam')->nullable()->comment('最新国网运维考试批次');
            $table->string('initial_degree')->nullable()->comment('初始学历');
            $table->string('initial_school')->nullable()->comment('毕业院校');
            $table->string('initial_major')->nullable()->comment('专业');
            $table->date('initial_graduation_date')->nullable()->comment('毕业时间');
            $table->string('highest_degree')->nullable()->comment('最高学历');
            $table->string('highest_school')->nullable()->comment('毕业院校');
            $table->string('highest_major')->nullable()->comment('专业');
            $table->date('highest_graduation_date')->nullable()->comment('毕业时间');
            $table->string('project')->nullable()->comment('所属项目');
            $table->string('office_location')->nullable()->comment('办公地点');
            $table->string('status')->nullable()->comment('是否在职');
            $table->string('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('nw_ybz_ypt_userinfo');
    }
}
